Python for Scientists by John M. Stewart

Python for Scientists by John M. Stewart

Author:John M. Stewart [Stewart, John M.]
Language: eng
Format: azw3, pdf
Publisher: Cambridge University Press
Published: 2017-07-31T04:00:00+00:00


6.5.2

The animation task

As its name suggests, the animation module is supposed to produce animations, but it does so in a crude way, and is highly platform dependent. Fortunately an add-on module, JSAnimation, has been developed, which, although lightweight, does the job. The “JS” refers to javascript, which is included in most modern operating systems. The module can be downloaded8 and installed according to the recipe in Section A.5. We show how to produce a simple animation of the solitary wave with from within the IPython notebook.

import numpy as np

import matplotlib.pyplot as plt

%matplotlib inline

from matplotlib import animation

from JSAnimation import IPython_display



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.